﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="SilverlightApplication1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="591" d:DesignWidth="770">

    <Grid Background="#FFCEE8D5" Height="584" Width="763" DataContext="{Binding NotifyOnValidationError=True}">
        <Grid.RowDefinitions>
            <RowDefinition Height="90*" />
            <RowDefinition Height="85*" />
            <RowDefinition Height="231*" />
            <RowDefinition Height="157*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="105*" />
            <ColumnDefinition Width="220*" />
            <ColumnDefinition Width="386*"/>
            <ColumnDefinition Width="0*"/>
            <ColumnDefinition Width="0*" />
        </Grid.ColumnDefinitions>

        <TextBox Grid.Column="2" Grid.Row="1"  Height="32" HorizontalAlignment="Left" Margin="44,25,0,0" x:Name="textBox1" VerticalAlignment="Top" Width="216" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=[High], NotifyOnValidationError=True}" />
        <TextBox Grid.Column="2" Height="33" HorizontalAlignment="Left" Margin="44,26,0,0" x:Name="textBox2" VerticalAlignment="Top" Width="216" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=[Low], NotifyOnValidationError=True}"  />
        <sdk:Label Content="Low" Height="34" HorizontalAlignment="Left" Margin="26,26,0,0" x:Name="label1" VerticalAlignment="Top" Width="43" Grid.Column="1" />
        <sdk:Label Content="High" Grid.Row="1" Height="34" HorizontalAlignment="Left" Margin="26,26,0,0" x:Name="label2" VerticalAlignment="Top" Width="77" Grid.Column="1" />
        <Grid Margin="0,0,12,0" Grid.Row="2" Grid.Column="1"  Grid.ColumnSpan="2" DataContext="{Binding Mode=TwoWay, Path=[InnerInterval], NotifyOnValidationError=True}" x:Name="InnerGrid" Background="#FFECEBBB" d:LayoutOverrides="GridBox" Height="239" VerticalAlignment="Top" BindingValidationError="InnerGrid_BindingValidationError">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="130*"/>
                <ColumnDefinition Width="232*" />
                <ColumnDefinition Width="276*"/>

            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="59*"/>
                <RowDefinition Height="48*"/>
                <RowDefinition Height="132*"/>
            </Grid.RowDefinitions>
            <sdk:Label Content="Inner Low" HorizontalAlignment="Left" Margin="71,23,0,0" x:Name="label3" Width="126" d:LayoutOverrides="GridBox" Height="25" VerticalAlignment="Top" Grid.Column="1" />
            <TextBox Grid.Column="2" HorizontalAlignment="Left" Margin="17,23,0,13" x:Name="textBox3" Width="213" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=[Low], NotifyOnValidationError=True}" />
            <sdk:Label Content="Inner High" HorizontalAlignment="Left" Margin="73,13,0,0" x:Name="label3_Copy" Width="92" RenderTransformOrigin="0.516,3.205" Grid.Row="1" Height="25" VerticalAlignment="Top" Grid.Column="1" />
            <TextBox Grid.Column="2" HorizontalAlignment="Left" Margin="16,11,0,10" x:Name="textBox3_Copy" Width="213" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=[High], NotifyOnValidationError=True}"  Grid.Row="1"/>
            <sdk:ValidationSummary Filter="PropertyErrors" Foreground="#FF190000" Grid.RowSpan="3" Margin="0,0,0,54" />
        </Grid>
        <Button Content="Send" Grid.Column="2" Margin="0,106,85,15" Grid.Row="3" HorizontalAlignment="Right" Width="87" Height="40" Click="Button_Click" d:LayoutOverrides="GridBox, VerticalMargin"  />
        <sdk:ValidationSummary Filter="PropertyErrors" Foreground="#FF190000" Grid.RowSpan="2" Margin="0,-4,0,0" />
        <sdk:ValidationSummary Filter="PropertyErrors" Foreground="#FF190000" Margin="0,6,0,49" Grid.Row="2" Target="{Binding Path=[InnerInterval], ElementName=InnerGrid}" DataContext="{Binding}"  />
        <Button Content="Fake Remote Exception" Grid.Column="1" Grid.Row="3" Height="41" HorizontalAlignment="Left" Margin="39,106,0,0" Name="button1" VerticalAlignment="Top" Width="151" Click="button1_Click" />
        <ComboBox Grid.Column="1" Grid.Row="3" Height="28" HorizontalAlignment="Left" Margin="16,31,0,0" Name="comboBox1" VerticalAlignment="Top" Width="202" ItemTemplate="{StaticResource SmallPersonTemplate}" ItemsSource="{Binding Mode=OneWay, Path=[OtherInfos][Persons], ValidatesOnNotifyDataErrors=True, ValidatesOnExceptions=True, NotifyOnValidationError=True}" />
    </Grid>

    
</UserControl>
